package org.apache.dubbo.demo.consumer.example.eg15;

import org.apache.dubbo.demo.consumer.example.AbstractConsumer;
import org.apache.dubbo.demo.example.eg15.DemoService;
import org.junit.Test;

public class Application extends AbstractConsumer {

  @Test
  public void testCallback() {
    DemoService demoService = (DemoService) context.getBean("demoService");
    String result = demoService.sayHello("xufeng", (msg) -> {
      System.out.println("callback msg: " + msg);
      return "result from consumer";
    });
    System.out.println("***************** result: " + result + " *****************");
  }


}
